package com.ls.stream;

/**
 * 加密常量，用E便于区分常量
 * 
 * @author Administrator
 *
 */
public class EConstants {
	public static final String CHARSET = "UTF-8";
	public static final String PARAMNULLMSG = "参数%s不能为空";
	public static final String DEFAULT_ENCRYPTED_PASSWD = "YONYOU";
	public static final String CACHE_ACCESS_EXPIRE = "cache.access.expire";
	public static final String OLD_KEY_EXPIRE = "oldkey.expire";
	public static final String SSP_CACHE_ACCESS_EXPIRE = "ssp.cache.access.expire";
	public static final String SSP_OLD_KEY_EXPIRE = "ssp.oldkey.expire";
	public static final String  ENABLED = "enabled";
	public static final String  ENCRYPTION = "encryption";
	public static final String  ENCRYPTION_DISABLE = "ENCRYPTION_DISABLE";
	public static final String KEYMAP_NAME = "keymap";
	public static final String NODE2KEYID_NAME = "node2Keyid";
	public static final String OLDKEY_NAME = "oldKey";
	public static final String SSP_KEYMAP_NAME = "sspKeymap";
	public static final String SSP_NODE2KEYID_NAME = "sspNode2Keyid";
	public static final String SSP_OLDKEY_NAME = "sspOldKey";
	public static final String ENCRYPTED_FILE_NAME = ".encryptedkey";
	public static final String USERDIR=System.getProperty("user.home");
	public static final String ENCRYPTED_FILE_PATH =USERDIR + java.io.File.separator + ".encryption"
			+ java.io.File.separator + ENCRYPTED_FILE_NAME;
	public static final String STORE_PASS = "STORE_PASS";
	public static final String ALIAS = "ALIAS";
	public static final String KEYSTORE_PATH = "KEYSTORE_PATH";
	public static final String CERT_PATH = "certPath";
	public static final String CERT_PATH_LINUX = "certPath_linux";
	public static final String CERT_PATH_WINDOW = "certPath_window";
	public static final String CERTURL = "certUrl";
	public static final String SERIALNUMBER = "serialNumber";
	public static final String SSP_SERIALNUMBER= "sspSerialNumber";
	public static final String SSP_CERT_PATH= "sspCertPath";
	public static final String SSP_CERTURL= "sspCertUrl";
	
	// cc和ma的密钥标识符,notifier
	public static final String CONTROLLER_IDENTIFIER = "controller_encrypt";
	public static final String MONITOR_IDENTIFIER = "monitor_encrypt";
	public static final String SSP_IDENTIFIER = "ssp_encrypt";
	// cc，ma和Agent的密钥协商通道
	public static final String CONTROLLER_NEGOTIATION = "controller_negotiation";
	public static final String MONITOR_NEGOTIATION = "monitor_negotiation";
	public static final String AGENT_NEGOTIATION = "%s_negotiation";
	
	// cc,ma和Agent的密钥更新通知广播通道；
	public static final String CONTROLLER_NOTIFICATION = "controller_notification";
	public static final String MONITOR_NOTIFICATION = "monitor_notification";
	public static final String AGENT_NOTIFICATION = "%s_notification";
	public static final String SSP_CLIENT_NOTIFICATION = "ssp_client_notification";
	public static final String SSP_NOTIFICATION = "ssp_notification";
	public static final String SSP_SERVER_NOTIFICATION = "ssp_server_notification";
	//密钥更新周期，时间秒
	public static final String CHANGE_KEY_PERIOD = "key.exchange";
	public static final String SSP_CHANGE_KEY_PERIOD = "ssp.key.exchange";
	public static final String CHARGE_KEY_CHANNEL = "charge.key.channel";
	public static final String CHARGE_KEY_ACTOR = "uap.soma.encryption.server.KeyChargeActor";
	public static final String CLIENT_LIMINT = "client.limit";
	public static final String CLIENT_LIMINT_PERIOD = "client.limit.period";
	public static final String EXCHANGE_STRATEGY = "exchange_stretegy";
	public static final String EXCHANGE_STRATEGY_CHANNEL = "exchange_strategy_channel";
	public static final String TRANSITION_STRATEGY_TIME = "transition.strategy.time";
	public static final String NODE_IDENTIFIER = "nodeIdentifier";
	public static final String SERVER_CHANNLE = "server_channel";
	
	//db
	public static final String ENCRYPTION_LENGTH = "encryption_length";
	public static final String NO_CHARGE_KEY = "no.charge.key";
	public static final long DEFAULT_TRANSITION_TIME = 5;
	public static final String DEFAULT_COMPRESS_ALGORITHM= "default.compress.algorithm";
	public static final String CCURL= "http://%s:%d/soma/encryption/cloud.cer";
	public static final int MAXLENGTH = 200;
		
	//defaultval
	public static final long DEFAULT_CHANGE_KEY_PERIOD=7200;
	public static final long DEFAULT_EXPIRE=7200;
	public static final long DEFAULT_ACCESS_EXPIRE=7200;
	public static final int DEFAULT_ENCRYPTION_LENGTH=10;
	public static final int DEFAULT_CLIENT_LIMINT=10;
	public static final String DEFAULT_ALIAS="cloud";
	public static final long DEFAULT_CLIENT_LIMINT_PERIOD=120;
	public static final String DEFAULT_CERT_URL="http://soma.yonyou.com/nexus/content/repositories/uap/cert/cloud.cer";
	public static final String DEFAULT_SSP_CERT_URL="http://soma.yonyou.com/nexus/content/repositories/uap/cert/cloud.cer";
	public static final long DEFAULT_SERIALNUMBER=1862886467;
	//register client
	public static final String  DEFAULT_REGISTER_IDETIFIER="%ssoma%s";
	public static final String DEFAULT_PROVIDER_NAME = "BC";
	public static final int RENEGOINTERVAL = 2;

	public static class Compress{
		public static final String SNAPPY="snp";
		public static final String LZ4="lz4";
		public static final String JDK_DEFLATE="jdf";
		public static final String JDK_GIP="jg";
		public static final String XZ="xz";
		public static final String NONE="none";
		public static final String BZIP2="bz2";
		public static final String APACHE_DEFLATE="adf";
		public static final String APACHE_GZIP="az";
		public static final String APACHE_XZ="axz";
		
	}
	
	
	
	

}
